# 基础镜像
FROM openjdk:8-jdk-alpine

ONBUILD ARG JAR_NAME
ONBUILD ENV  JAR_NAME=${JAR_NAME} \
    JAVA_OPS="" \
    CONFIG_OPS=""

ONBUILD COPY target/${JAR_NAME}.jar /apps/${JAR_NAME}/app.jar
ONBUILD ENTRYPOINT java ${JAVA_OPS} -jar /apps/${JAR_NAME}/app.jar ${CONFIG_OPS}


#构建镜像:docker build -t xm/dev/base-jdk8:1.0 .